import { ref } from "vue";
import { establishmentDetailApi } from "../../../api/userAudit";
import { delay } from "@/utils";
export const useDetail = function (id) {
  const detailRef = ref(null);
  establishmentDetailApi(undefined, {
    id,
  }).then(async (resp) => {
    const { code, msg, data } = resp;
    await delay(1000);
    if (code === 200) {
      detailRef.value = data;
    }
  });
  return {
    detail: detailRef,
  };
};
